package com.ruoyi.system.api.factory;

import com.ruoyi.system.api.RemoteEmailService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;

@Component
public class RemoteEmailFallbackFactory implements FallbackFactory<RemoteEmailService> {
    private static final Logger log= LoggerFactory.getLogger(RemoteProjectResearchFallbackFactory.class);
    @Override
    public RemoteEmailService create(Throwable cause) {
        return new RemoteEmailService() {
            @Override
            public void sendEmail() {
                log.error("发送失败:{}",cause.getMessage());
            }

            @Override
            public Boolean verifyCode(String inputCode) {
                return false;
            }
        };
    }
}
